﻿namespace Away.IdentityServer.Core.Services.Impl;

[ServiceInject(ServiceLifetime.Scoped)]
public class IdResourceService : IIdResourceService
{
    private readonly IIdResourceRepository _idResourceRepository;
    public IdResourceService(IIdResourceRepository idResourceRepository)
    {
        _idResourceRepository = idResourceRepository;
    }

    public List<SelectItems> List()
    {
        return _idResourceRepository.List();
    }

    public IResult Page(IdResourcesSearch search)
    {
        return _idResourceRepository.Page(search);
    }

    public void Remove(List<int> ids)
    {
        _idResourceRepository.Remove(ids);
    }

    public void Save(IdentityResource model)
    {
        _idResourceRepository.Save(model);
    }
}
